package com.itheima.domian;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author 12441
 */
@Data
public class Category implements Serializable{


   private Integer type;
   private String name;
   @JsonSerialize(using = ToStringSerializer.class)
   private Long id;
   private Integer sort;

   //自动填充字段
   @TableField(fill = FieldFill.INSERT)
   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   private LocalDateTime createTime;

   @TableField(fill = FieldFill.INSERT_UPDATE)
   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   private LocalDateTime updateTime;

   @TableField(fill = FieldFill.INSERT)
   private String createUser;

   @TableField(fill = FieldFill.INSERT_UPDATE)
   private String updateUser;





}
